#ifndef SCREENSHOT_H
#define SCREENSHOT_H

#include <QtGui/QMainWindow>
#include<QPixmap>
#include<QClipboard>
#include<QDesktopWidget>
#include <QMouseEvent>
#include<windows.h>
#include<QTimer>
#include<QKeyEvent>
#include<QPaintEvent>
#include<QPainter>
#include<QPalette>

#include "ui_screenshot.h"

class ScreenShot : public QMainWindow
{
	Q_OBJECT

public:
	ScreenShot(QWidget *parent = 0, Qt::WFlags flags = 0);
	~ScreenShot();

private:
	Ui::ScreenShotClass ui;

	QPixmap pixmap, current_pixmap;
	QPoint start_point , end_point;
	QPainter painter;
	
	int x , y, w, h;
	bool is_pressed;

	void set_rect() ;

	void mousePressEvent(QMouseEvent *event);
	void mouseReleaseEvent(QMouseEvent *event);
	void mouseMoveEvent(QMouseEvent *event);
	void keyPressEvent(QKeyEvent *event);
	

	void paintEvent( QPaintEvent *event) ;

};

#endif // SCREENSHOT_H
